﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPages/Default.Master" CodeBehind="Activate.aspx.vb" Inherits="GuildCMS.Account.Activate" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../CSS/Account/Activate.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.validate.min.js" type="text/javascript"></script>

    <!-- jQuery validate JavaScript. -->
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#form1").validate();
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <%-- Panel displaying the registration form to the visitor. --%>
    <asp:Panel ID="panForm" runat="server">
        <div class="formitemholder">
            <div class="formitemlabel"><asp:Label ID="lblEmail" AssociatedControlID="txtEmail" runat="server" Text="Registered Email:"></asp:Label></div>
            <div class="formitemelement">
                <asp:TextBox ID="txtEmail" runat="server" CssClass="required email" MaxLength="100"></asp:TextBox>      
                <asp:CustomValidator ID="valEmail" runat="server"
                    Display="Dynamic"
                    ValidateEmptyText="true"
                    ControlToValidate="txtEmail"
                    ErrorMessage="Email address appeares to be invalid."
                    OnServerValidate="valEmail_ServerValidate">
                </asp:CustomValidator>
            </div>
        </div>
        <div class="formitemholder">
            <div class="formitemlabel"><asp:Label ID="lblCode" AssociatedControlID="txtCode" runat="server" Text="Activation Code: "></asp:Label></div>
            <div class="formitemelement">
                <asp:TextBox ID="txtCode" runat="server" CssClass="required" MaxLength="10"  MinLength="10"></asp:TextBox>        
                <asp:CustomValidator ID="valCode" runat="server"
                    Display="Dynamic"
                    ValidateEmptyText="true"
                    ControlToValidate="txtCode"
                    ErrorMessage="Activation code appears to be invalid."
                    OnServerValidate="valCode_ServerValidate">
                </asp:CustomValidator>
            </div>
        </div>
        <div class="formitemholder">
            <div class="formitemlabel"></div>
            <div class="formitemelement">
                <asp:HyperLink ID="lnkResend" NavigateUrl="~/Account/Resend.aspx" runat="server">Resend activation email</asp:HyperLink>
            </div>
        </div>
        <div>
            <div class="submitholder">
                <div class="formitemlabel"></div>
                <div class="formitemelement">
                    <asp:Button ID="btnActivate" runat="server" Text="Activate Account" CausesValidation="true" />
                    <asp:HyperLink ID="lnkRegister" runat="server" NavigateUrl="~/Account/Register.aspx">Register</asp:HyperLink>
                </div>
            </div>
        </div>
    </asp:Panel>
    
    <%-- Panel displayed to the visitor once the form has been submitted successfully. --%>
    <asp:Panel ID="panInstructions" Visible="false" runat="server">
        Your account is now activated.<br />
        <asp:HyperLink ID="lnkLogin" NavigateUrl="~/Account/Login.aspx" runat="server">Click here</asp:HyperLink> to login to your new account.
    </asp:Panel>
    
</asp:Content>
